package com.itheima.outputstream;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo02 {
    public static void main(String[] args) throws IOException {
        System.out.println(new File("day12\\cba.txt").exists());
        //小坑  如果文件不存在 就创建
        FileOutputStream fos = new FileOutputStream("day12\\cba.txt");
        fos.write(97);
        fos.write(98);
        fos.write(99);
        fos.close();
        //文件夹 不存在 创建不了
        FileOutputStream fos2 = new FileOutputStream("day12\\bbb\\a.txt");
        fos2.write(97);
        fos2.write(98);
        fos2.write(99);
        fos2.close();
    }
}
